ccR.Add_Rotation(
	2,
	"Ankhy_BASIC_Feral",
	"BASIC Rotation.\n\nMade by Ankhy"
)

function Ankhy_BASIC_Feral()
	if (ccR.Player.IsInCombat() or (ccR.Player.IsInGroup() and ccR.Target.IsInCombat())) and ccR.Target.Is.Attackable() then

		if GetShapeshiftForm() == 2 then
			if ccR.Player.HasTalent("Bloodtalons") and ccR.Spell.IsReady("Healing Touch") and (ccR.Player.Combo_Points() > 3 and ccR.Player.HasBuff("Predatory Swiftness") or ccR.Player.Buff.Duration("Predatory Swiftness", "<=", 0.4)) then ccR.Cast.Spell("Healing Touch") end
			if (ccR.Player.IsInStealth() or ccR.Player.HasBuff("Incarnation: King of the Jungle")) and ccR.Player.Combo_Points() < 5 and ccR.Spell.CanAttack("Rake") then ccR.Cast.Attack("Rake") end
			if ccR.Player.HasBuff("Tiger's Fury") and ccR.Spell.IsReady("Berserk") and ccR.Spell.IsReady("Incarnation: King of the Jungle") and ccR.Target.IsBoss() and ccR.Target.Is.Attackable() then ccR.Cast.Spell("Incarnation: King of the Jungle") end
			if ccR.Player.HasBuff("Incarnation: King of the Jungle") and ccR.Spell.IsReady("Berserk") and ccR.Target.IsBoss() and ccR.Target.Is.Attackable() then ccR.Cast.Spell("Berserk") end
			if ccR.Player.Energy() <= 30 and ccR.Spell.IsReady("Tiger's Fury") then ccR.Cast.Spell("Tiger's Fury") end
			if ccR.Player.Combo_Points() > 4 and ccR.Target.Health() <= 20 and ccR.Target.HasMyDebuff("Rip") and ccR.Spell.CanAttack("Ferocious Bite") then ccR.Cast.Attack("Ferocious Bite") end
			if ccR.Player.Combo_Points() > 4 and not ccR.Player.HasBuff("Savage Roar") and ccR.Spell.IsReady("Savage Roar") then ccR.Cast.Spell("Savage Roar") end
			if ccR.Player.Combo_Points() > 4 and ccR.Target.HasMyDebuff("Rip") and ccR.Player.Energy() > 50 and ccR.Spell.CanAttack("Ferocious Bite") then ccR.Cast.Attack("Ferocious Bite") end
			if ccR.Player.Combo_Points() > 4 and (not ccR.Target.HasMyDebuff("Rip") or ccR.Target.DebuffDuration("Rip", "<", 7.2)) and ccR.Spell.CanAttack("Rip") then ccR.Cast.Attack("Rip") end
			if ccR.Player.Count(8) >= 2 then ThrashALL() end
			if ccR.Player.Count(8) >= 4 and ccR.Spell.IsReady("Swipe") then ccR.Cast.Spell("Swipe") end
			if ccR.Player.Count(8) < 4 and ccR.Player.Combo_Points() < 5 and (not ccR.Target.HasMyDebuff("Rake") or ccR.Target.DebuffDuration("Rake", "<", 4.2)) and ccR.Spell.CanAttack("Rake") then ccR.Cast.Attack("Rake") end
			if ccR.Player.Has.Talent("Lunar Inspiration") and ccR.Player.Count(8) < 4 and ccR.Player.Combo_Points() < 5 and (not ccR.Target.HasMyDebuff(155625) or ccR.Target.DebuffDuration(155625, "<", 4.2)) and ccR.Spell.CanAttack(155625) then ccR.Cast.Attack(155625) end
			if ccR.Player.Count(8) < 4 and ccR.Target.HasMyDebuff("Rake") and ccR.Player.Combo_Points() < 5 and ccR.Spell.CanAttack("Shred") then ccR.Cast.Attack("Shred") end
		end	
	end
end

function ThrashALL()
	for x = 1, # ccR_Enemies do
		local vUnit = ccR_Enemies[x]
		if ccR.Unit.Distance(vUnit, "player") <= 8
		and not ccR.Unit.Has.MyDebuff(vUnit, 106830)
		and ccR.Spell.IsReady(106830)
		then 
			ccR.Cast.Spell(106830) 
		end
	end	
end	